package com.ayf.payment.game.api.utils;

import java.util.Date;

/**
 * @Description: 流水号
 * @Author: zh-liang
 * @Date : 2019-12-09 17:05
 */
public class SerialNumberUtil {
    public static String getSerialNumber() {
        String id = SnowFlakeUtils.getUniqueId();
        String date = DateUtils.dateToIntegerst(new Date(), "yyMMddHHmmss");
        String num = "T" + date + id;
        return num;
    }

    public static String getSerialNumberAuto() {
        String id = SnowFlakeUtils.getUniqueId();
        String date = DateUtils.dateToIntegerst(new Date(), "yyMMddHHmmss");
        String num = "A" + date + id;
        return num;
    }
}
